package dame;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test {
    /*public static void main(String[] args) {
        int[] array = new int[]{1,2,3,4,5,6,7,8,9};
        List<Integer> list = new ArrayList<>();
        for (int i=0;i<array.length;i++){
            if (array[i]==2||array[i]==3){
                list.add(array[i]);
            }
            if (array[i]>3&&(array[i]%2!=0&&array[i]%3!=0)){
                list.add(array[i] );
            }
        }
        System.out.println(list);
        int sum = 0;
        for (int j=0;j<list.size();j++){
            sum += list.get(j);
        }
        System.out.println(sum);
    }*/
    public static void main(String[] args) {
        int[] array = new int[]{10,2,2,5,7,3};
        System.out.println("排序前:"+ Arrays.toString(array));
        //Sort.mysort(array);
        //System.out.println("排序后:"+Arrays.toString(array));
        //Sort.Hillsort(array);
        //Sort.Selectsort(array);
        //Sort.Bubblesort(array);
        //Sort.Quicksort(array);
        Sort.mergeSort(array);
        System.out.println("排序后:"+Arrays.toString(array));
        }
    }
